<? 
include 'db_info.php';
include 'error.php';

$teamname = $_GET['teamname'];
$get_team = mysqli_query($connect, "SELECT * FROM team WHERE teamname='".$teamname."'");
$team = mysqli_fetch_array($get_team);
mysqli_free_result($get_team);
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ko" lang="ko">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>팀 수정 - 트러스 합주시간표</title>
<style type="text/css">
body { color: black; font-size: 10pt; font-family: 맑은고딕, 돋움;}
th { color: white; padding: 10px; font-size: 15pt; font-family: 맑은고딕, 돋움; font-weight: bold; background: #71A7F0;}
td { padding: 5px; }
a { color: #FF4848; font-weight: bold; text-decoration:none; }
</style>
<link rel="shortcut icon" href="images/sound.ico" />
<link rel="apple-touch-icon" href="images/sound.png" />
</head>
<body>

<form method="post" action="modify_ok.php?teamname=<?=$teamname?>">
<table border="0" cellspacing="0" cellpadding="0" width="600" align="center">
<colgroup>
	<col width="150"  align="right"/>
	<col width="450" />
	<col span="2" />
</colgroup>
<tr><td colspan="2" align="right"><a href="index.php">돌아가기</a></td></tr>
<tr height="30"><td colspan="2" bgcolor="#b9d3ff" align="center" >합주팀 정보 수정</td></tr>
<tr height="25">
	<td bgcolor="#dae8ff" align="right">팀명 : </td>
	<td><input type="text" name="newteamname" size="20" maxlength="20" value="<?=$team['teamname']?>" /></td>
</tr>
<tr height="50">
	<td bgcolor="#dae8ff" align="right">관리암호 (필수) : <br />원래 비밀번호</td>
	<td><input type="password" name="teampw" size="20" maxlength="20" /></td>
</tr>
<tr height="50">
	<td bgcolor="#dae8ff" align="right">변경할 비밀번호 : <br />변경시 입력</td>
	<td><input type="password" name="newteampw" size="20" maxlength="20" />
	암호 확인 : <input type="password" name="newteampw2" size="20" maxlength="20" /></td>
</tr>
<tr height="25">
	<td bgcolor="#dae8ff" align="right">보컬 : </td>
	<td><input type="text" name="vocal" size="20" maxlength="20" value="<?=$team['vocal']?>" /></td>
</tr>
<tr height="25">
	<td bgcolor="#dae8ff" align="right">퍼스트기타 : </td>
	<td><input type="text" name="first" size="20" maxlength="20" value="<?=$team['first']?>" /></td>
</tr>
<tr height="25">
	<td bgcolor="#dae8ff" align="right">세컨기타 : </td>
	<td><input type="text" name="second" size="20" maxlength="20" value="<?=$team['second']?>" /></td>
</tr>
<tr height="25">
	<td bgcolor="#dae8ff" align="right">베이스기타 : </td>
	<td><input type="text" name="bass" size="20" maxlength="20" value="<?=$team['bass']?>" /></td>
</tr>
<tr height="25">
	<td bgcolor="#dae8ff" align="right">드럼 : </td>
	<td><input type="text" name="drum" size="20" maxlength="20" value="<?=$team['drum']?>" /></td>
</tr>
<tr height="25">
	<td bgcolor="#dae8ff" align="right">키보드 : </td>
	<td><input type="text" name="keyboard" size="20" maxlength="20" value="<?=$team['keyboard']?>" /></td>
</tr>
<tr height="25">
	<td bgcolor="#dae8ff" align="right">선곡 내용 : <br />(혹은 추가 설명)</td>
	<td><textarea name="others" rows="5" cols="50"><?=$team['others']?></textarea></td>
</tr>
<tr height="25">
	<td bgcolor="#dae8ff" align="right">합주시간 : </td>
	<td>
		<? include 'timeselect_modify.php'; ?>
	</td>
</tr>
<tr>
	<td colspan="2" align="center">
			<input type="submit" name="Submit" value="등록하기" />
			<input type="reset" name="Reset" value="다시 작성하기" />
			<input type="button" value="등록 취소" onclick="history.go(-1)" />
	</td>
</tr>
</table>
</form>

</body>
</html>